package com.action.gulimall.auth.feign;

import com.action.common.utils.R;
import com.action.gulimall.auth.vo.UserLoginVo;
import com.action.gulimall.auth.vo.UserRegisterVo;
import com.action.gulimall.auth.vo.WeiboSocialUser;
import feign.Logger;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author sl shilun217@qq.com
 * @Deacription TODO
 * @date 2021/06/28/21:16
 **/
@FeignClient(value="gulimall-member")
public interface MemberFeignService{
    @PostMapping(value = "/member/member/register")
    R register(@RequestBody UserRegisterVo vo);


    @PostMapping(value = "/member/member/login")
    R login(@RequestBody UserLoginVo vo);

    @PostMapping(value = "/member/member/weibo/login")
    R oauthLogin(@RequestBody WeiboSocialUser socialUser);

    @PostMapping(value = "/member/member/weixin/login")
    R weixinLogin(@RequestParam("accessTokenInfo") String accessTokenInfo);
}

//class MemberConfiguration{
//
//    @Bean
//    public Logger.Level Logger() {
//        return Logger.Level.FULL;
//    }
//}
